package Beans;

import javax.servlet.http.HttpServletRequest;

import Helpers.ApplicationConfiguration;

public class PageDescriptionBean implements java.io.Serializable{
private static final long serialVersionUID = 1L;
	
	public PageDescriptionBean() {}
	
	private HttpServletRequest request;
	private String pageName = "";
	private String pageDescription = "";

	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}
	
	public void calculate() {
		String target = request.getParameter("target");
		String description = ApplicationConfiguration.getInstance().getTargetInCurrentRedirectorBySource(target).get("description");
		pageName = target;
		pageDescription = description;
	}

	public String getPageName() {
		return pageName;
	}
	
	public String getPageDescription() {
		return pageDescription;
	}
}
